﻿using ExamPlat.Models;
using ExamPlat.ViewModels;
using System.Collections.Generic;

namespace ExamPlat.Repositories
{
    interface IUserInfoRepository
    {
        /// <summary>
        /// 增加用户
        /// </summary>
        /// <param name="model">用户信息</param>
        /// <returns></returns>
        int AddUserInfo(UserInfo model);
        /// <summary>
        /// 修改用户
        /// </summary>
        /// <param name="model">用户信息</param>
        /// <returns></returns>
        int UpdateUserInfo(UserInfo model);
        /// <summary>
        /// 删除用户
        /// </summary>
        /// <param name="id">用户ID</param>
        /// <returns></returns>
        int DelUserInfo(int id);
        /// <summary>
        /// 根据用户ID查询用户信息
        /// </summary>
        /// <param name="id">用户ID</param>
        /// <returns></returns>
        UserInfo GetUserInfoByID(int id);

        /// <summary>
        /// 根据登录帐号和登录密码查询用户信息
        /// </summary>
        /// <param name="loginAccount"></param>
        /// <param name="loginPwd"></param>
        /// <returns></returns>
        UserInfo GetUserInfoByAccountAndPwd(string loginAccount,string loginPwd);
        /// <summary>
        /// 根据条件查询用户信息
        /// </summary>
        /// <param name="loginAccount">登录帐号</param>
        /// <param name="userName">用户姓名</param>
        /// <returns></returns>
        IList<ViewUserInfo> GetUserInfos(string loginAccount="", string userName="");
    }
}
